wiki:XmlRpcAddComment

AddComment

Intro

add comment to a subtitle


Description

struct AddComment(string $token, struct('idsubtitle' => int $idsubtitle, 'comment' => string $comment, 'badsubtitle' => int $badsubtitle) $data)

Allows registered users to add a new comment to subtitle.


Parameters

struct(
  (string) [token],
  struct(
    (int)    [idsubtitle],
    (string) [comment],
    (int)    [badsubtitle]
  ) [data]
)
token (required)
token string identifying user's session, taken from LogIn output structure.
data (required)
comment input data structure containing:
  • idsubtitle (required):
    • subtitle identifier
    • BEWARE! this is not the ID of subtitle file but of the whole subtitle (a subtitle can contain multiple subtitle files)
  • comment (required): user's comment
  • badsubtitle: optional parameter. If set to 1, subtitles are marked as bad.

Return Values

Output is returned in this structure:

  struct(
    (string) [status],
    (double) [seconds]
  )

and contains these elements:

status
function result code, see list of status codes
seconds
time taken to execute this command on server

Implementations

There are currently no available sample implementations.


Changelog

  • [2008-10-13] Version 1: created this function

Examples

Input

<methodCall>
 <methodName>AddComment</methodName>
 <params>
  <param>
   <value>
    <string>u77pcgogdg5ttkcn9bgtvmf964</string>
   </value>
  </param>
  <param>
   <value>
    <struct>
     <member>
      <name>idsubtitle</name>
      <value><int>3322956</int></value>
     </member>
     <member>
      <name>comment</name>
      <value><string>thanks for the subtitles, I really appreciate it. Good work, keep them comin'.</string></value>
     </member>
     <member>
      <name>badsubtitle</name>
      <value><int>0</int></value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodCall>

Output

<methodResponse>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>status</name>
      <value><string>200 OK</string></value>
     </member>
     <member>
      <name>seconds</name>
      <value><double>0.955</double></value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodResponse>

Notes

none yet


See also


Comments

add your comments, hints and suggestions here if you like ...


[Prev] Home [Next]

Last modified 16 years ago Last modified on Oct 13, 2008, 8:24:12 PM